<?php 

require('../connect_db.php');

$p_id = $_GET['id'];

$product_result = mysql_query("SELECT * FROM producten WHERE Productid = ".$p_id." ") or die(mysql_error());

$product_wishlist = mysql_query("SELECT * FROM wishlist")  or die(mysql_error());

$inhoud_wishlist = mysql_query("INSERT INTO wishlist (Productid) VALUES(".$p_id.")") or die(mysql_error());


while($wishlist_row = mysql_fetch_array($product_wishlist))
{
	echo"<table border = '1'><tr><td>".$wishlist_row['Productid']."</td></tr></table>";
	if($p_id == $p_id)
	{
		die(mysql_error());
	}
}

echo "<div style='width:80%; float:left; font:28px, Times new Roman;'><strong> Winkelmandje </strong>
	<table border='1'>
	<tr>
			<td width='450' align='center'><strong>Naam</strong></td>
			<td width='150' align='center'><strong>Prijs</strong></td>
	</tr>";

	
	while($product_row = mysql_fetch_array($product_result))
	{
	  echo "<tr>
			<td align='left'>".$product_row['Naam']."</td>
			<td align='center'>".$product_row['Prijs']."</td>
			
		</tr>";
	}		
	
echo "</table>";

?>